<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><?=$title?></title>	
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta  http-equiv="description" content="Free open source blog software based on codeigniter." />
    <meta http-equiv="keywords" content="Free,open,source,blog,website,codeigniter,web design,speedovation,hosting" />
    <meta http-equiv="author" content="Yash Bharadwaj" />
	<link rel="stylesheet" href="<?=base_url()?>themes/clearpixels/css/style.css" type="text/css" media="screen, projection" />
</head>

<body>
<div id="wrap">
<div id="header">
<h1 id="sitename" title="<?=$this->session->userdata('BLOGTitle')?>"><?=$this->session->userdata('BLOGName')?></h1>
<div id="nav"><form action="#">
<div id="search"><input type="text" class="keyword" value="Search" />
 </div>
</form>
<div id="topmenu">
<ul>
	<li class="active"><?=anchor('blog/','Home');?></li>
	<?=$pages?>


</ul>

</div>
</div>
<div class="clear"></div>
&nbsp;</div>
<div id="content">
<div id="right">
<div id="featured">
<div>
ClearPixels is a free CSS Template released under the Creative Commons Attribution 2.5 License by RamblingSoul. You can download other quality css templates from my profile or <a href="http://ramblingsoul.com">website</a>.</div>
<span class="ftd_btm"><a href="#">Read More</a></span></div>
<?php

//we're checking for Guest permissions.Whether he can see the blog  or not.
                         if($this->session->userdata('GuestView')==1||$this->uri->segment(1)=="users")
                            echo $allposts;
                           else
						   echo "Please login! This is for members only site";
						   ?>
                        


    </div>
    <div id="sidebar">
    <div id="sidebartop"></div><?php 
    //known bug two form can't work together working to remove this.
							 if($this->uri->segment(1)!="users" &&$this->uri->segment(2)!="do_search" )  { ?>
							<h2>Search</h2>&nbsp;
                            <?=$SearchForm; ?>
                            <? } ?>
<?php if($this->session->userdata('ShowCategories')==1) {?>
                            <h2>Categories</h2>
                            <?=$Categories?>
                            <?php }?>
                            
                            <?php if($this->session->userdata('ShowRecentPosts')==1) {?>
                             <h2>Latest Entries</h2>
                             <?=$RecentPosts?>
                            <?php }?>
                            
                            <?php if($this->session->userdata('ShowRecentComments')==1) {?>
                             <h2>Latest  Comments</h2>
                            <?=$RecentComments?>
                            <?php }?>
                             
                            <?php if($this->session->userdata('ShowArchives')==1) {?>
                            <h2>Archives</h2>
                            <?=$Archives?>
                           	<?php }?>
                           
                           <h2>Users</h2>
                          			   <?php
                                        if($this->session->userdata('logged_in'))
                                        {?>
                                        <ul>
                                            <li>&nbsp;&nbsp;&nbsp;&nbsp;Welcome <?=$this->session->userdata('first_name')?>&nbsp;<?=$this->session->userdata('last_name')?></li>
                                            <li><?=anchor('users/ViewProfile/'.$this->session->userdata('user_id'),'View Profile')?></li>
                                            <li><?=anchor('users/Logout','Logout')?></li>
                                        </ul> 
                                       <?php } else {?>
                                        <ul>
                                            <li><?=anchor('users/Register','Register')?></li>
                                            <li><?=anchor('users/Login','Login')?></li>
                                            <li><?=anchor('users/ForgetPassword','Forget Password')?></li>
                                        </ul>
                                        <?php }?>
                         
                      	  <h2>TagClouds</h2>
                          <?=$TagClouds?>
                            
                      	  <?php if($this->session->userdata('ShowCalendar')==1) {?> 
                   		  <h2>Calendar</h2>
                          <?=$this->calendar->generate();?>
                          <?php }?>
    <div id="sidebarbtm"></div>
</div>
<div class="clear"></div>
<div id="bottom">
<p>Copyright &copy; 2008 YourSiteName</p>
<p><a href="#">You</a> | <a href="#">Can</a> | <a href="#">Put</a> | <a href="#">Some</a> | <a href="#">Links</a> | <a href="#">Here</a></p>
</div>
</div>

<div id="footer">
<div id="credits">
<?=$this->session->userdata('BLOGName')?> is powered by <a href="http://speedovation.org">Blogmer</a>|| Design by <a href="http://ramblingsoul.com">RamblingSoul</a>  

</div>
</div>

</body>
</html>
